import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Layout from '../views/Layout.vue'



Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    component:Layout,
    children:[{
       path:'home',
       component:Home
    },
    {
      path:'/home_Ad',
      name:'/home_Ad',
      component:()=> import ('../views/Home_Ad.vue')
    },
    {
       path:'profile',
       component:()=>import('../views/Page/Profile.vue')
    },
    {
       path:'orders',
       component:()=>import('../views/Page/Orders.vue')
    },
    {
       path:'reserve',
       name:'reserve',
       component:()=>import('../views/Page/Reserve.vue')
    },
    {
       path:'userAd',
       component:()=>import('../views/Page/UserAd.vue')
    },
    {
      path:'stadium',
      component:()=>import('../views/Page/ChooseStadium.vue')
    },
    {
       path:'stadiumAd',
       component:()=>import('../views/Page/StadiumAd.vue')
    },
    {
       path:'commentAd',
      component:()=>import('../views/Page/CommentAd.vue')
    },
    {
       path:'courtAd',
       component:()=>import('../views/Page/CourtAd.vue')
    },
    {
       path:'orderAd',
       component:()=>import('../views/Page/OrderAd.vue')
    },
    {
       path:'noticeAd',
       component:()=>import('../views/Page/NoticeAd.vue')
    },
    {
       path:'charts',
       component:()=>import('../views/Page/Charts.vue')
    },
   ],
  },
  {
    path:'/login',
    name:'Login',
    component:()=> import ('../views/Login.vue')
  },
]


const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
